<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<script>
	function cancelar(){
		document.forms[0].action="habitacion.do";
		document.forms[0].metodo.value="cancelNuevaHab";
	    document.forms[0].submit();
	}
</script>
<div id="posts">
	<div class="post">
	
		<html:form action="habitacion-registro">
			<input type="hidden" name="metodo" value="nuevaHab"/>
			<html:hidden property="idhabitacion"/>
		
		<h2 class="title">Registro de Nueva Habitacion</h2>
			<div class="story">
			
			<table width="450px" border="0" cellspacing="0" cellpadding="3">
				<tr>
					<th>Numero:</th>
					<td><html:text property="numero"/></td>
				</tr>
				<tr>
					<td colspan="2"><font color="red"><html:errors property="numero" header="empty" /></font></td>
				</tr>
				<tr>
					<th>Piso:</th>
					<td><html:text property="piso"/></td>
				</tr>
				<tr>
					<td colspan="2"><font color="red"><html:errors property="piso" header="empty"/></font></td>
				</tr>
				<tr>
					<th>Tipo:</th>
					<td>
					<html:select property="idtipoHabitacion">
						<html:option value="">--Ninguno--</html:option>	
						<html:options collection="lstipohabitacion" labelProperty="nombre" property="idtipoHabitacion"  />
					</html:select>
					</td>
				</tr>
				<tr>
					<td colspan="2"><font color="red"><html:errors property="idtipoHabitacion" header="empty"/></font></td>
				</tr>
				<tr>
					<th>Categoria:</th>
					<td><html:select property="idcategoria">
						<html:option value="">--Ninguno--</html:option>
						<html:options collection="lstCategorias" labelProperty="nombre" property="idcategoria"  />
					</html:select>
					</td>
				</tr>
				<tr>
					<td colspan="2"><font color="red"><html:errors property="idcategoria" header="empty"/></font></td>
				</tr>
				<tr>
					<th>Precio Base:</th>
					<td><html:text property="precioBase"/></td>
				</tr>
				<tr>
					<td colspan="2"><font color="red"><html:errors property="precioBase" header="empty"/></font></td>
				</tr>
				<tr>
					<th>Estado:</th>
					<td>
						
						<html:select property="estado">
							<html:option value="0">libre</html:option>
							<html:option value="1">reservada</html:option>
							<html:option value="2">hospedaje</html:option>
							<html:option value="3">mantenimiento</html:option>
						</html:select>
					</td>
				</tr>
				<tr>
					<td colspan="2"><font color="red"><html:errors property="estado" header="empty"/></font></td>
				</tr>
				<tr>
					<td colspan="2" align="center">
						<input name="btnRegistrar" value="Registrar" type="submit" class="input-normalb"/>
						<input name="btnCancelar" value="Cancelar" type="button" onclick="javascript:cancelar();" class="input-normalb"/>
					</td>
				</tr>
			</table>
			
			</div>		
		</html:form>
	</div>
</div>